import {createRouter, createWebHashHistory} from "vue-router";

enum ViewName {
    Home = 'home',
    Login = 'login',
    Register = 'register',
    VideoChat = 'video-chat'
}


const routes = [
    {
        path:'/',
        name:ViewName.Home,
        component:()=>import('../components/MainFrame.vue')
    },
    {
        path:'/login',
        name:ViewName.Login,
        component:()=>import('../components/Login.vue')
    },
    {
        path:'/register',
        name:ViewName.Register,
        component:()=>import('../components/Register.vue')
    },
    {
        path:'/video-chat',
        name:ViewName.VideoChat,
        component:()=>import('../views/VideoChatWindow.vue')
    }
]


const router = createRouter({routes:routes,history: createWebHashHistory("/")})

export {router,ViewName}